#include "iStreamable.h"
#include "IOStream.h"

using namespace neiderra;
using namespace neiderra::core;

iStreamable::iStreamable()
: _inputStream(0), _outputStream(0)
{
}

void iStreamable::setInputStream(iInputStream* input)
{
	if(!input)
		throw EBadStream();

	_inputStream = input;
}

void iStreamable::setOutputStream(iOutputStream* output)
{
	if(!output)
		throw EBadStream();

	_outputStream = output;
}

iInputStream* iStreamable::getInputStream()
{
	return _inputStream;
}

iOutputStream* iStreamable::getOutputStream()
{
	return _outputStream;
}

